package com.example.yeujian5.yuejian5.service;

import com.example.yeujian5.yuejian5.bean.PictureBean;
import com.example.yeujian5.yuejian5.bean.UserBean;
import com.example.yeujian5.yuejian5.bean.UserCollect;
import com.example.yeujian5.yuejian5.bean.UserOrder;
import com.example.yeujian5.yuejian5.bean.UserOrderInfo;

import java.util.List;

import retrofit2.Call;
import retrofit2.http.GET;
import retrofit2.http.Path;
import retrofit2.http.Query;

/**
 * Created by wangmengmeng on 2017/9/28.
 */

public interface UserService {

    @GET("login")
    Call<UserBean> LoginImpl(
            @Query("tel") String tel,
            @Query("password") String pwd
    );
    //注册
    @GET("reg")
    Call<UserBean> RegImpl(
            @Query("realname") String name,
            @Query("tel") String tel,
            @Query("password") String pwd
    );

    @GET("/workout/api.php/getmine/SessionID/{SessionID}/userid/{userid}")
    Call<UserBean> getUserById(
            @Path("SessionID") String SessionID,
            @Path("userid") String userid
    );
    //取消关注俱乐部
    @GET("/workout/api.php/delete/mod/{mod}/club_id/{club_id}/user_id/{user_id}/SessionID/{SessionID}")
    Call<Integer> Nocollect(
            @Path("mod") String mod,
            @Path("club_id") String club_id,
            @Path("user_id") String user_id,
            @Path("SessionID") String SessionID
    );
    @GET("/workout/api.php/updatepass/SessionID/{SessionID}/userid/{userid}/password/{password}")
    Call<UserBean> EditUser(
            @Path("SessionID") String SessionID,
            @Path("userid") String userid,
            @Path("password") String password
    );
    //用户关注列表
    @GET("/workout/api.php/lists/mod/{mod}/SessionID/{SessionID}/userid/{userid}")
    Call<List<UserCollect>> getcollect(
            @Path("mod") String mod,
            @Path("SessionID") String SessionID,
            @Path("userid") String userid
    );
    //获取晒图列表
    @GET("/workout/api.php/lists/mod/{mod}/SessionID/{SessionID}/userid/{userid}")
    Call<List<PictureBean>> getShaituByUser(
            @Path("mod") String mod,
            @Path("SessionID") String SessionID,
            @Path("userid") String userid
    );

    //获取全部订单列表
    @GET("/workout/api.php/lists/mod/{mod}/listorder/update_time/userid/{userid}/SessionID/{SessionID}")
    Call<List<UserOrder>> getAllOrderByUser(
            @Path("mod") String mod,
            @Path("userid") String userid,
            @Path("SessionID") String SessionID
    );

    //获取已完成或者未参加订单
    @GET("/workout/api.php/lists/mod/{mod}/listorder/update_time/userid/{userid}/vstate/{vstate}/SessionID/{SessionID}")
    Call<List<UserOrder>> getOrderByType(
            @Path("mod") String mod,
            @Path("userid") String userid,
            @Path("vstate") String vstate,
            @Path("SessionID") String SessionID
    );

    //获取订单详情信息
    @GET("/workout/api.php/getDOrder/id/{id}/type/{type}/SessionID/{SessionID}")
    Call<UserOrderInfo> getSignById(
            @Path("id") String id,
            @Path("type") String type,
            @Path("SessionID") String SessionID
    );
    //获取订单申请退款
    @GET("/workout/api.php/refund/id/{id}/type/{type}/SessionID/{SessionID}")
    Call<UserOrderInfo> NoSign(
            @Path("id") String id,
            @Path("type") String type,
            @Path("SessionID") String SessionID
    );
}
